Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications


set-cookie

This function sets a persistent state cookie in the Web browser by outputting an HTTP Set-Cookie header with specified options. The Web browser on future requests sends the name and associated value of the cookie automatically. This is especially useful for preserving state information between requests.

Location: web\method\cookies.i

Parameters:

INPUT p_name AS CHARACTER

The name of the cookie.

INPUT p_value AS CHARACTER

The value of the cookie.

INPUT p_date AS DATE

The optional expiration date (local). If the Unknown value (?) is specified, the cookie expires when the browser session ends.

INPUT p_time AS INTEGER

The optional expiration time (local) as a number of seconds since midnight. This parameter only has meaning if p_date is not the Unknown value (?). If you do not want to set a specific time, specify the Unknown value (?).

INPUT p_path AS CHARACTER

The URL path to which the cookie should apply. If Unknown value (?) is specified, the value of the DefaultCookiePath configuration option is used or, if that is not set, the value of the AppURL global variable.

INPUT p_domain AS CHARACTER

The optional domain to which the cookie should apply. If Unknown value (?) is specified, value of the DefaultCookieDomain configuration option is used or, if that is not set, the domain option is not set on the cookie. In that case, the current hostname of the Web server is used by the Web browser.

INPUT p_options AS CHARACTER

A comma-delimited list of options. The valid values are as follows:

See also:

output-content-type

delete-cookie

get-cookie

delete-cookie


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095